package api

import (
	"ecommerce-customer-support-chat/api/handler"
	"github.com/gin-gonic/gin"
)

func Goods(r *gin.Engine) {
	api := r.Group("./api")
	{
		user := api.Group("/user")
		{
			user.POST("/register", handler.Register)
			user.POST("/login", handler.Login)
		}
		chat := r.Group("/chat")
		{
			chat.POST("/chats", handler.Chat)
			chat.POST("/create", handler.CreateUser)
			chat.POST("/createRoom", handler.CreateRoom)
			chat.POST("/findUser", handler.FindUser)
			chat.POST("/findHistory", handler.FindHistory)
		}
	}
}
